﻿#ifndef ELEMENTSTATUSBAR_H
#define ELEMENTSTATUSBAR_H

#include <QStatusBar>

class QAction;
struct ElementStatusBarPrivate;
class QLabel;
class ElementStatusBar : public QStatusBar
{
    Q_OBJECT
public:
    ElementStatusBar(QWidget *parent = nullptr);
    ~ElementStatusBar();
    void setLeftAction(QAction* action);
    void setRightAction(QAction* action);
    QWidget *setLeftDisplayer(QLabel *left, int width=0);
    QWidget *setRightDisplayer(QLabel *right, int width=0);
    QWidget *setMidDisplayer(QWidget *mid, int width=0);
public:
    void showMessageOnRight(const QString& msg, int timeout=0);
signals:
public slots:
    void showMessageOnLeft(const QString& msg,int timeout=0);
private:
    friend struct ElementStatusBarPrivate;
    ElementStatusBarPrivate* mPrivate;
};

#endif // ELEMENTSTATUSBAR_H
